<script setup>
import router from "../router";
// 编程式路由导航
const ToMockPage = () => {
  router.push("/mock");
};
const ToStorePage = () => {
  router.push("/store");
};
const ToPassValue = () => {
  router.push("/passvalue");
};
const ValueToCom = () => {
  router.push("/valuetocom");
};
</script>
<template>
  <h1>首页页面</h1>
  <hr />
  <h2>下面是使用编程式导航实现页面跳转</h2>
  <div><button @click="ToMockPage">click to Mock page</button></div>
  <div><button @click="ToStorePage">click to Store page</button></div>
  <div><button @click="ToPassValue">click to PassValue page</button></div>
  <div><button @click="ValueToCom">click to ValueToCom page</button></div>
</template>

<style scoped>
button {
  height: 34px;
  width: 280px;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
}
</style>
